Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pattern SString #214

Closed
wants to merge 3 commits into from
Closed

Add pattern SString #214

wants to merge 3 commits into from

Conversation

Bodigrim
Copy link
Contributor

@Bodigrim Bodigrim commented Nov 3, 2021

I wonder if this could provide a lightweight resolution to #207, alternative to #208. @newhoggy what do you think?

The idea is to use SString to perform T.pack / T.unpack when on GHC 7.10+ (which covers the vast majority of users) and resort to slow read . show (#207 (comment)) only on older systems.

@Bodigrim
Copy link
Contributor Author

Bodigrim commented Nov 3, 2021

Actually, the latest incarnation of #208 is pretty lightweight, and this patch is obnoviously CPP-heavy, so dunno if I can claim any improvement ;) Feel free to close, this is just a raw experiment.

@sjakobi
Copy link
Collaborator

sjakobi commented Nov 3, 2021

I don't have any personal experience with using -f-text, but it seems to me that the API enhancements in #208 are more powerful since they also provide ways for using the lazy-Text and Builder based parts of the prettyprinterAPI.

Nevertheless, I'm curious what @newhoggy thinks about this PR.

@Bodigrim
Copy link
Contributor Author

Bodigrim commented Nov 3, 2021

@sjakobi if you are fine with #208, then it's indeed a more flexible and powerful way forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants